package com.qiaofang.constant;

import com.qiaofang.common.utils.StringUtil;

public enum SystemIdEnum {

    ADMIN("0", "运营后台"),
    DEVELOPERS("1", "巧渠道"),
    ASSISTANT("2", "案场助手"),
    AGENCY_h5("3", "分销助手"),
    AGENCY_WEB("4", "巧分销"),
    APP_ASSISTANT("5", "APP案场"),
    APP_AGENCY("6", "APP分销"),
    WEAPP_AGENCY("7", "小程序分销");

    private String code;
    private String name;

    SystemIdEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static SystemIdEnum getByCode(String code) {
        for (SystemIdEnum value : SystemIdEnum.values()) {
            if (StringUtil.equals(value.code,code)){
                return value;
            }
        }
        return null;
    }

}
